package model

import (
	"food-mgr/food-service/configs"
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30);comment:用户名"`
	Password string `gorm:"type:char(32);comment:密码"`
	Tel      string `gorm:"type:char(11);comment:手机号"`
}

func FindUser(u *User, id int) {

	configs.DB.Where(" id=?", id).First(&u)
}
